package com.hexacta.hrs.test.data;

import java.util.List;
import java.util.Map;

import org.vectrics.company.Sector;

/**
 * Test data dependency creator for the Sector class.
 * 
 * @author tpollak
 */
public class SectorTestDataDependencyCreator extends AbstractTestDataDependencyCreator {

    public static final String IT_SECTOR = "IT_SECTOR";

    public SectorTestDataDependencyCreator(List<TestDataDependencyCreator> dependencies) {
        super(dependencies);
    }

    public void createDependentTestData(Map<String, Object> context) {
        Sector itSector = this.createSector("it", "sector.it");

        itSector = this.insertCodedObject(itSector);

        this.storeCodedObjectReferenceInContext(context, IT_SECTOR, itSector);
    }

    private Sector createSector(String code, String description) {
        Sector sector = new Sector();
        sector.setCode(code);
        sector.setDescriptionCode(description);
        sector.setVoided(false);

        return sector;
    }
}
